package com.fx.common;

import com.fx.controller.CreateNewProjectController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class ActionControllerHandlerBuilder {

    @Autowired
    private CreateNewProjectController controller;


    public void performControlAction(MenuItemActionType t){
        switch (t){
            case NEW_PROJECT:
                controller.openWindow();
                break;
            case NEW_MODULE:
                break;
        }
    }

    public boolean canPerformControlAction(MenuItemActionType t){
        boolean result = false;
        switch (t){
            case NEW_PROJECT:
            case NEW_MODULE:
                result = true;
                break;
        }
        return result;
    }
}
